package com.jushu.storbox.filesystem;

import android.content.Context;

public class FileManagerFactory {
	
	private static iFileManager contextFileManager = null;
	
	/**
     * @param context 
     * @return {@link iFileManager}
     */
    public static iFileManager getFileManager(Context context)
    {
    	return instanceLocalFileManagerImpl(context);
    }

	private static iFileManager instanceLocalFileManagerImpl(Context context) {
		if(contextFileManager == null) {
    		contextFileManager = new LocalFileManageImpl(context);
    	}
    	return contextFileManager;
	}
    
    /**
     * @param context 
     * @param path 
     * @return {@link iFileManager}
     */
    public static iFileManager getFileManager(Context context,String path)
    {
    	return instanceLocalFileManagerImpl(context);
    }
}
